/*
 * FaceDetector.h
 *
 *  Created on: Sep 5, 2013
 *      Author: clivemyrie
 */
#include "cv.h"
#include "highgui.h"
#include "Face.h"
#include "FrameGrabber.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include <float.h>
#include <limits.h>
#include <time.h>
#include <ctype.h>
#ifndef FACEDETECTOR_H_
#define FACEDETECTOR_H_

using namespace cv;

class FaceDetector {
public:
	FaceDetector();
	virtual ~FaceDetector();

	// Create a string that contains the cascade name
	const char* cascade_name;

	IplImage* theFaceImage;

	Face run(FrameGrabber aFrameGrabber);

	//accessors
	CascadeClassifier getCascade();
	CvMemStorage* getStorage();
private:
	Face detect_and_draw(IplImage* image);
	Face detect(IplImage* image);

};

static CvMemStorage* theStorage;

//static CvHaarClassifierCascade* theCascade;

static CascadeClassifier theCascade;


#endif /* FACEDETECTOR_H_ */
